package com.manlitech.cloudboot.config.canalconfig;

/**
 * @author shensg
 * @date 2021/7/16 17:28
 */
import com.manlitech.cloudboot.config.canalconfig.pojo.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import top.javatool.canal.client.annotation.CanalTable;
import top.javatool.canal.client.handler.EntryHandler;

@Component
@CanalTable(value = "test")
public class TestHandler implements EntryHandler<Test> {

    private Logger logger = LoggerFactory.getLogger(TestHandler.class);

    @Override
    public void insert(Test test) {
        logger.info("insert message  {}", test);
    }

    @Override
    public void update(Test before, Test after) {
        logger.info("update before {} ", before);
        logger.info("update after {}", after);
    }

    @Override
    public void delete(Test test) {
        logger.info("delete  {}", test);
    }
}
